/*
 * @Author: 明月下
 * @Date: 2022-08-04 22:50:11
 * @LastEditors: 明月下
 * @LastEditTime: 2022-08-05 01:01:05
 * @FilePath: \ali-yun-slimming\vue3-vite\src\api\mongodb.ts
 * @Description:
 */
import requset from '../utils/request'
// import Ajax from '  '

export const getByName = (name: string|null): Promise<any> => {
    return requset({
        url:'get',
        data: {name},
        method: 'post'
    })
}

export const addByName = (data: {name:string,weight:string,date:string}): Promise<any> => {
    return requset({
        url:'add',
        data,
        method: 'post'
    })
}